package com.lg.dborder2.service.impl;

import com.lg.dborder2.mapper.UserMapper;
import com.lg.dborder2.model.SysRole;
import com.lg.dborder2.model.SysUser;
import com.lg.dborder2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<SysUser> findAll(){
        return userMapper.selectAll();
    }

    @Override
    public SysUser selectById(Long id) {
        return userMapper.selectById(id);
    }

    @Override
    public List<SysRole> selectRoleByUserId(Long id) {
        return userMapper.selectRoleByUserId(id);
    }

    @Override
    public Integer insert(SysUser sysUser) {
        return userMapper.insert(sysUser);
    }
}
